package com.one.service;

import com.alibaba.fastjson.JSONObject;
import com.one.bean.User;
import com.one.bean.UserLogin;
import com.one.vo.UserVo;
import com.one.vo.WechatUser;

/**
 * @Author ShiWen
 * @date 2022/1/14 10:36
 * @Version 1.0
 * @Description TODO 用户登录相关业务
 */
public interface UserService {
    /**
     * @author ShiWen
     * @date 2022/1/14 19:04
     * @param
     * @return
     * @description 根据手机号登录获取 用户视图实体
     */
    UserVo loginByPhone(String phone);
    /**
     * @author ShiWen
     * @date 2022/1/14 10:38
     * @param
     * @return java.lang.Boolean
     * @description 判断使用手机和密码登录是否正确
     */
    UserLogin isLoginByPwd(String phone, String password);
    /**
     * @author ShiWen
     * @date 2022/1/14 11:31
     * @param userid
     * @return com.one.bean.User
     * @description 根据id查询用户信息
     */
    User selectUserById(Integer userid);

    /**
     * @author ShiWen
     * @date 2022/1/14 15:54
     * @param
     * @return
     * @description 判断手机号是否存在
     */
    boolean isPhone(String phone);

    /**
     * @author ShiWen
     * @date 2022/1/14 17:18
     * @param
     * @return
     * @description 手机号自动注册
     */
    boolean regisByPhone(String phone);
    /**
     * @author ShiWen
     * @date 2022/1/17 11:05
     * @param
     * @return
     * @description 微信登录绑定手机号注册
     */
    boolean regisByWechatBindingPhone(JSONObject userinfo, String phone);
    /**
     * @author ShiWen
     * @date 2022/1/14 17:18
     * @param
     * @return
     * @description 根据手机号查找登录信息
     */
    UserLogin selectUserLoginByPhone(String phone);
}
